﻿@model MsForgeReboot.Framework.ViewModels.ImageViewModel

@{
    ViewBag.Title = "Edit";
}
@section Header {
    @Styles.Render("~/bundles/controlpanel/mediaGallery/edit_css")
}
<h2>@ViewBag.Title</h2>

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>ImageViewModel</legend>

        <div class="control-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label" })

            <div class="controls">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.PostedFile, new { @class = "control-label" })

            <div class="controls">

                <div class="fileupload fileupload-new" data-provides="fileupload">
                    <div class="fileupload-preview thumbnail" style="width: 200px; height: 150px;"></div>
                    <div>
                        <span class="btn btn-file">
                            <span class="fileupload-new">Izaberite sliku</span>
                            <span class="fileupload-exists">Promeni</span>
                            <input type="file" name="mediaItemUpload" id="mediaItemUpload" />
                        </span>
                        <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Ukloni</a>
                    </div>
                </div>
            </div>

        </div>

        <div class="control-group">
            <div class="controls">
                <button class="btn btn-success" role="form">Snimi <i class="icon-save"></i></button>
            </div>
        </div>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/controlpanel/mediaGallery/edit")
}
